const mysql = require("mysql");
var con = mysql.createConnection({
    host:'localhost',
    port:3306,
    user:'root',
    password:'',
    database:'cyw'
})
var userName = process.argv[2]
var selectSql = "select userName, age from users where userName = '"+ userName +"' ";
con.query(selectSql,[userName],(err,result) => {
    if(err){
        console.log(err);
    }else{
        var userList = result;
        for(var i = 0; i < userList.length;  i++){
            console.log(userList[i].age);
        }
    }
})